var expect = require('chai').expect;
var time = require('../../../static/util/index.js');

describe('Time', function(){
	describe('#two', function(){
		it('should return two bit string', function(){
			var result1 = time.two(1),
				result2 = time.two('1'),
				result3 = time.two(12),
				result4 = time.two('12')

			expect(result1).to.equal('01');
			expect(result2).to.equal('01');
			expect(result3).to.equal(12);
			expect(result4).to.equal('12');
		})
	})

	describe('#getFullTime', function(){
		it('should return object of date', function(){
			var date = new Date(1445520524480);
			var result = time.getFullTime(date);

			expect(result).to.have.a.property('year', 2015)
			expect(result).to.have.a.property('month', 10)
			expect(result).to.have.a.property('week', '星期四')
			expect(result).to.have.a.property('day', 22)
			expect(result).to.have.a.property('hour', 21)
		})
	})
})